import 'dart:async';

import 'package:flutter/services.dart';

class OnepieceChopper {
  static const MethodChannel _channel =
      const MethodChannel('onepiece_chopper');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static Future<bool> init(String appId) async {
    return await _channel.invokeMethod('init', appId);
  }

  static Future<bool> postException(String message, String detail) async {
    return await _channel.invokeMethod('postException', Map.from({
      'message': message,
      'detail': detail,
    }));
  }
}
